package com.zmn.brs.persistence.interfaces.objective.record;

import com.zmn.brs.model.entity.objective.record.ObjectiveRecord;
import com.zmn.brs.model.entity.objective.record.ObjectiveRecordQuery;
import com.zmn.brs.model.query.record.ObjectiveRecordCustomDIO;
import org.apache.ibatis.annotations.Param;

import java.util.List;



/**
 * 
 * 
 * @author chongw
 *
 * @since 2021-06-21 17:06:36
 */
public interface ObjectiveRecordDao {

    /**
     * 查询
     * @param id ID
     * @return
     */
    ObjectiveRecord findByKey(Integer id);

    /**
     * 分页搜索
     * @param query 条件
     * @return 列表
     */
    List<ObjectiveRecord> listPageByQuery(ObjectiveRecordQuery query);

    /**
     * 搜索
     * @param query 条件
     * @return
     */
    List<ObjectiveRecord> listByQuery(ObjectiveRecordQuery query);

    /**
     * 查询当前员工数据
     * @param query
     * @return
     */
    List<ObjectiveRecordCustomDIO> listObjectiveRecordByQuery(ObjectiveRecordQuery query);

    /**
     * 所有数据
     * @return
     */
    List<ObjectiveRecord> listAll();

    /**
     * 统计
     * @param query 条件
     * @return
     */
    Integer countByQuery(ObjectiveRecordQuery query);
    /**
     * 更新状态
     *
     * @param objectiveRecord
     * @return
     */
    Integer updateStatusByKey(ObjectiveRecord objectiveRecord);

    /**
     * 更新状态：批量
     * @param ids
     * @param status
     * @param mcStaffName
     * @return
     */
    Integer updateBatchStatusByKey(@Param("ids")List<Integer> ids, @Param("status")Integer status, @Param("staffName")String mcStaffName);
    /**
     * 更新
     * @param objectiveRecord
     * @return
     */
    Integer updateByKey(ObjectiveRecord objectiveRecord);

    /**
     * 插入
     * @param objectiveRecord
     * @return
     */
    Integer insert(ObjectiveRecord objectiveRecord);

    /**
     * 删除
     * @param id ID
     * @return
     */
    Integer deleteByKey(Integer id);
}
